<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<body>

<div id="pagination-container" class="pt-1">
  <p class="text-muted p-1">当前第 [[${page.getNumber()+1}]] 页，总计 [[${page.getTotalPages()}]] 页，共 [[${page.getTotalElements()}]] 条记录</p>
  <nav aria-label="Page navigation example">
    <ul class="pagination">
      <li class="page-item" th:if="${page.hasPrevious()}">
        <a class="page-link" href="#" th:href="@{${requestURI}(page=${page.getNumber()})}" tabindex="-1" aria-disabled="true">Previous</a>
      </li>
      <li th:class="${currentPageNumber == page.getNumber()+1 ? 'page-item active' : 'page-item'}" class="page-item" th:each="currentPageNumber:${#numbers.sequence(1, page.getTotalPages())}"><a class="page-link" th:href="@{${requestURI}(page=${currentPageNumber})}" href="#">[[${currentPageNumber}]]</a></li>
      <li class="page-item" th:if="${page.hasNext()}">
        <a class="page-link" href="#" th:href="@{${requestURI}(page=${page.getNumber()+2})}">Next</a>
      </li>
    </ul>
  </nav>
</div>

</body>
</html>